import request from '@/utils/request'
// -------- 咨询方式 --------

let BASE_ADDRESS = 'work/documents'

//  id查询
export function getselectMaterialGetInfoApi(params) {
    //console.log(params)
    return request({
        url: `${BASE_ADDRESS}/getInfo`,
        method: "get",
        params
    })
}

// 分页查询
export function getselectMaterialListApi(params) {
    //console.log(params)
    //console.log(`${BASE_ADDRESS}/list`)
    return request({
        url: `${BASE_ADDRESS}/list`,
        method: "get",
        params
    })
}

//  添加关联文案
export function getselectMaterialaddApi(data) {
    console.log(data)
    return request({
        url: `${BASE_ADDRESS}/add`,
        method: "POST",
        data
    })
}

//  修改关联文案
export function getselectMaterialEditApi(data) {
    console.log(data)
    return request({
        url: `${BASE_ADDRESS}/edit`,
        method: "PUT",
        data
    })
}
//  修改关联文案状态
export function getselectMaterialEditStatusApi(id, status) {
    // console.log(data)
    return request({
        url: `${BASE_ADDRESS}/editStatus/${id}/${status}`,
        method: "PUT",
    })
}
//  相关内容
export function getrelatedContentApi(data) {
    console.log(data)
    return request({
        url: `${BASE_ADDRESS}/relatedContent`,
        method: "get",
        data
    })
}
// 删除
export function getselectMaterialRemoveApi(data) {
    //console.log(`${BASE_ADDRESS}/remove?id=` + data)
    return request({
        url: `${BASE_ADDRESS}/remove?id=` + data,
        method: "delete",
    })
}